package project;
public class PhoneBillCalculator {

    public double calculateBill(int minutes, int seconds) {
        double totalBill = 0.0;

        // 将秒数向上进位到分钟
        if (seconds > 0) {
            minutes++;
        }

        // 根据通话时间计算费用
        if (minutes <= 1) {
            totalBill = 0.05;
        } else if (minutes <= 20) {
            totalBill = minutes * 0.05;
        } else {
            totalBill = 1.00 + (minutes - 20) * 0.10;
        }

        return totalBill;
    }
}
